package com.atguigu.zuoye2;


import java.util.Scanner;

/**
 * @Description: 第五题
 * @Author: Hank
 * @Date: 2025/2/11 17:09
 */

public class Array1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入字符串");
        String str = scanner.nextLine();
        int count = 0;
        for (int i = 0 ; i < str.length() ; i++) {
            if (str.charAt(i) == 'a') {
                count++;
            }
        }
        System.out.println("a有:" + count);
    }
}
